git clone 下载代码一直报error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly错误的解决思路 您所在的位置:网站首页 git 错误notavalidobjectname git clone 下载代码一直报error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly错误的解决思路

git clone 下载代码一直报error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly错误的解决思路

2024-02-21 08:20| 来源: 网络整理| 查看: 265

问题:git  clone  下载代码一直报错误

Cloning into 'aplanmis-project'...remote: Enumerating objects: 176887, done.remote: Counting objects: 100% (176887/176887), done.remote: Compressing objects: 100% (75181/75181), done.error: RPC failed; curl 18 transfer closed with outstanding read data remainingfatal: the remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failed

 

解决思路 把缓存区大小设置大点:根据项目的具体情况来设置缓冲区大小

git config --global http.postBuffer 524288000     # 2GBgit config --global http.postBuffer 2097152000        # 2GBgit config --global http.postBuffer 3194304000       # 3GB

 执行上面命令如果依旧clone失败,考虑可能原因2:网络下载速度缓慢 git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999

2.用http方式下载代码,发现可能依旧会存在该问题,用ssh方式来下载代码,下面是ssh公钥配置的说明

码云提供了基于SSH协议的Git服务,在使用SSH协议访问仓库仓库之前,需要先配置好账户/仓库的SSH公钥。可以参考:https://gitee.com/help/articles/4181#article-header0官网配置

生产ssh公钥:  ssh-keygen -t rsa -C "[email protected]"

邮箱地址: [email protected] 按照提示完成三次回车,即可生成 ssh key。通过查看 ~/.ssh/id_rsa.pub 文件内容,获取到你的 public key

 

 登录码云官网,点击个人LOGO,选择“设置”、“安全设置”、“ssh公钥”,添加生成的 public key 添加到仓库中。

 

测试是否可以连接成功 ssh -T [email protected]

 

 

 用ssh方式下载代码,发现可下载代码

git  clone   [email protected]:......ssh地址

 

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有